
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>全局快捷事件 · EasyClick开发文档</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="selector-node.html" />
    
    
    <link rel="prev" href="global.html" />
    

    
        <link rel="shortcut icon" href="/zh-cn/images/ico.png" type="image/x-icon">
    
    
    
    
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/zh-cn/images/ico.png">
    
    
        
    
    
        
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../../">
            
                <a href="../../../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../features.html">
            
                <a href="../../features.html">
            
                    
                    特性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../changelog.html">
            
                <a href="../../changelog.html">
            
                    
                    更改记录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../../getting-start.html">
            
                <a href="../../getting-start.html">
            
                    
                    开始
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../devtools/dev-tools.html">
            
                <a href="../devtools/dev-tools.html">
            
                    
                    开发工具介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../devtools/dev-tools-install.html">
            
                <a href="../devtools/dev-tools-install.html">
            
                    
                    安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../devtools/dev-tools-project.html">
            
                <a href="../devtools/dev-tools-project.html">
            
                    
                    工程相关
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../devtools/dev-tools-device.html">
            
                <a href="../devtools/dev-tools-device.html">
            
                    
                    设备相关
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../devtools/dev-tools-screen.html">
            
                <a href="../devtools/dev-tools-screen.html">
            
                    
                    屏幕相关
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../devtools/dev-tools-settings.html">
            
                <a href="../devtools/dev-tools-settings.html">
            
                    
                    设置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../../funcs.html">
            
                <a href="../../funcs.html">
            
                    
                    功能函数
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="global.html">
            
                <a href="global.html">
            
                    
                    全局模块
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.6.2" data-path="global-shortcut.html">
            
                <a href="global-shortcut.html">
            
                    
                    全局快捷事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="selector-node.html">
            
                <a href="selector-node.html">
            
                    
                    选择器&节点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../acevent-api.html">
            
                <a href="../acevent-api.html">
            
                    
                    无障碍事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../event-api.html">
            
                <a href="../event-api.html">
            
                    
                    代理事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../image-api.html">
            
                <a href="../image-api.html">
            
                    
                    图色函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../device-api.html">
            
                <a href="../device-api.html">
            
                    
                    设备函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="../file-api.html">
            
                <a href="../file-api.html">
            
                    
                    文件函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9" data-path="../http-api.html">
            
                <a href="../http-api.html">
            
                    
                    网络函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10" data-path="../thread-api.html">
            
                <a href="../thread-api.html">
            
                    
                    线程函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11" data-path="../utils-api.html">
            
                <a href="../utils-api.html">
            
                    
                    常用工具函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.12" data-path="../shell-api.html">
            
                <a href="../shell-api.html">
            
                    
                    Shell命令函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.13" data-path="../sqlite-api.html">
            
                <a href="../sqlite-api.html">
            
                    
                    Sqlite命令函数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../ui-custom.html">
            
                <a href="../ui-custom.html">
            
                    
                    原生UI定制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../ui-js-inter.html">
            
                <a href="../ui-js-inter.html">
            
                    
                    JS编写UI
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../ui-js-template.html">
            
                <a href="../ui-js-template.html">
            
                    
                    模板式UI
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../ui-native-view.html">
            
                <a href="../ui-native-view.html">
            
                    
                    原生UI控件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.3.1" data-path="../ui/linearlayout.html">
            
                <a href="../ui/linearlayout.html">
            
                    
                    LinearLayout线性布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.2" data-path="../ui/framelayout.html">
            
                <a href="../ui/framelayout.html">
            
                    
                    FrameLayout帧布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.3" data-path="../ui/relativelayout.html">
            
                <a href="../ui/relativelayout.html">
            
                    
                    RelativeLayout绝对布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.4" data-path="../ui/scrollview.html">
            
                <a href="../ui/scrollview.html">
            
                    
                    ScrollView滚动框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.5" data-path="../ui/view.html">
            
                <a href="../ui/view.html">
            
                    
                    View视图
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.6" data-path="../ui/button.html">
            
                <a href="../ui/button.html">
            
                    
                    Button按钮
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.7" data-path="../ui/textview.html">
            
                <a href="../ui/textview.html">
            
                    
                    TextView文本
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.8" data-path="../ui/edittext.html">
            
                <a href="../ui/edittext.html">
            
                    
                    EditText输入框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.9" data-path="../ui/checkbox.html">
            
                <a href="../ui/checkbox.html">
            
                    
                    CheckBox复选框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.10" data-path="../ui/radiogroup.html">
            
                <a href="../ui/radiogroup.html">
            
                    
                    RadioGroup布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.11" data-path="../ui/radiobutton.html">
            
                <a href="../ui/radiobutton.html">
            
                    
                    RadioButton单选框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.12" data-path="../ui/spinner.html">
            
                <a href="../ui/spinner.html">
            
                    
                    Spinner下拉选择框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.13" data-path="../ui/webview.html">
            
                <a href="../ui/webview.html">
            
                    
                    WebView内嵌浏览器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.14" data-path="../ui/imageview.html">
            
                <a href="../ui/imageview.html">
            
                    
                    ImageView图像
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.15" data-path="../ui/cardview.html">
            
                <a href="../ui/cardview.html">
            
                    
                    CardView卡片布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.16" data-path="../ui/switch.html">
            
                <a href="../ui/switch.html">
            
                    
                    Swtich开关按钮
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../html-ui-custom.html">
            
                <a href="../html-ui-custom.html">
            
                    
                    H5 UI定制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../../hot-update.html">
            
                <a href="../../hot-update.html">
            
                    
                    热更新功能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../../zk/zk.html">
            
                <a href="../../zk/zk.html">
            
                    
                    企业版中控接口
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../../zk/zk-ec-state.html">
            
                <a href="../../zk/zk-ec-state.html">
            
                    
                    EC状态控制接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../../zk/zk-node.html">
            
                <a href="../../zk/zk-node.html">
            
                    
                    全局节点模块接口
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.2.1" data-path="../../zk/global/zk-global-log.html">
            
                <a href="../../zk/global/zk-global-log.html">
            
                    
                    日志接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2.2" data-path="../../zk/global/zk-node-service.html">
            
                <a href="../../zk/global/zk-node-service.html">
            
                    
                    节点服务接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2.3" data-path="../../zk/global/zk-global-click.html">
            
                <a href="../../zk/global/zk-global-click.html">
            
                    
                    点击动作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2.4" data-path="../../zk/global/zk-global-multitouch.html">
            
                <a href="../../zk/global/zk-global-multitouch.html">
            
                    
                    多点触摸动作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2.5" data-path="../../zk/global/zk-global-swipe.html">
            
                <a href="../../zk/global/zk-global-swipe.html">
            
                    
                    滑动动作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2.6" data-path="../../zk/global/zk-global-drag.html">
            
                <a href="../../zk/global/zk-global-drag.html">
            
                    
                    拖动动作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2.7" data-path="../../zk/global/zk-global-input.html">
            
                <a href="../../zk/global/zk-global-input.html">
            
                    
                    输入动作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2.8" data-path="../../zk/global/zk-global-node.html">
            
                <a href="../../zk/global/zk-global-node.html">
            
                    
                    节点操作接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2.9" data-path="../../zk/global/zk-global-systemkey.html">
            
                <a href="../../zk/global/zk-global-systemkey.html">
            
                    
                    系统按键接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2.10" data-path="../../zk/global/zk-global-notice.html">
            
                <a href="../../zk/global/zk-global-notice.html">
            
                    
                    通知栏接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2.11" data-path="../../zk/global/zk-global-floatview.html">
            
                <a href="../../zk/global/zk-global-floatview.html">
            
                    
                    悬浮窗接口
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="../../zk/zk-agent.html">
            
                <a href="../../zk/zk-agent.html">
            
                    
                    代理事件模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" data-path="../../zk/zk-image.html">
            
                <a href="../../zk/zk-image.html">
            
                    
                    图色模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" data-path="../../zk/zk-device.md">
            
                <span>
            
                    
                    设备模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.6" data-path="../../zk/zk-file.md">
            
                <span>
            
                    
                    文件模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.7" data-path="../../zk/zk-http.md">
            
                <span>
            
                    
                    网络模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.8" data-path="../../zk/zk-utils.md">
            
                <span>
            
                    
                    常用工具模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.9" data-path="../../zk/zk-shell.md">
            
                <span>
            
                    
                    Shell命令模块接口 - 开发中
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.10" data-path="../../zk/zk-sqlite.md">
            
                <span>
            
                    
                    Sqlite模块接口 - 开发中
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../plugin/plugins.html">
            
                <a href="../plugin/plugins.html">
            
                    
                    插件开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../../question-answer.html">
            
                <a href="../../question-answer.html">
            
                    
                    常见问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../../agreement.html">
            
                <a href="../../agreement.html">
            
                    
                    用户协议
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="../../declare.html">
            
                <a href="../../declare.html">
            
                    
                    免责声明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15" >
            
                <span>
            
                    
                    技术交流 QQ群：777164022
            
                </span>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../.." >全局快捷事件</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon "></span><a href="#&#x8BF4;&#x660E;"><b>1. </b>&#x8BF4;&#x660E;</a></li><li><span class="title-icon "></span><a href="#&#x70B9;&#x51FB;&#x51FD;&#x6570;"><b>2. </b>&#x70B9;&#x51FB;&#x51FD;&#x6570;</a></li><ul><li><span class="title-icon "></span><a href="#clickpoint"><b>2.1. </b>clickPoint</a></li><li><span class="title-icon "></span><a href="#click"><b>2.2. </b>click</a></li><li><span class="title-icon "></span><a href="#clickrandom"><b>2.3. </b>clickRandom</a></li><li><span class="title-icon "></span><a href="#clickrandomrect"><b>2.4. </b>clickRandomRect</a></li><li><span class="title-icon "></span><a href="#clickcenter"><b>2.5. </b>clickCenter</a></li><li><span class="title-icon "></span><a href="#clicktext"><b>2.6. </b>clickText</a></li><li><span class="title-icon "></span><a href="#longclick"><b>2.7. </b>longClick</a></li><li><span class="title-icon "></span><a href="#longclickpoint"><b>2.8. </b>longClickPoint</a></li></ul><li><span class="title-icon "></span><a href="#&#x591A;&#x70B9;&#x89E6;&#x6478;"><b>3. </b>&#x591A;&#x70B9;&#x89E6;&#x6478;</a></li><ul><li><span class="title-icon "></span><a href="#multitouch-&#x591A;&#x70B9;&#x89E6;&#x6478;"><b>3.1. </b>multiTouch &#x591A;&#x70B9;&#x89E6;&#x6478;</a></li></ul><li><span class="title-icon "></span><a href="#&#x6ED1;&#x52A8;&#x51FD;&#x6570;"><b>4. </b>&#x6ED1;&#x52A8;&#x51FD;&#x6570;</a></li><ul><li><span class="title-icon "></span><a href="#swipe"><b>4.1. </b>swipe</a></li><li><span class="title-icon "></span><a href="#swipetopoint"><b>4.2. </b>swipeToPoint</a></li><li><span class="title-icon "></span><a href="#isscrollend"><b>4.3. </b>isScrollEnd</a></li></ul><li><span class="title-icon "></span><a href="#&#x62D6;&#x52A8;&#x51FD;&#x6570;"><b>5. </b>&#x62D6;&#x52A8;&#x51FD;&#x6570;</a></li><ul><li><span class="title-icon "></span><a href="#drag"><b>5.1. </b>drag</a></li><li><span class="title-icon "></span><a href="#dragto"><b>5.2. </b>dragTo</a></li><li><span class="title-icon "></span><a href="#dragtopoint"><b>5.3. </b>dragToPoint</a></li></ul><li><span class="title-icon "></span><a href="#&#x8F93;&#x5165;&#x6570;&#x636E;"><b>6. </b>&#x8F93;&#x5165;&#x6570;&#x636E;</a></li><ul><li><span class="title-icon "></span><a href="#currentisourime"><b>6.1. </b>currentIsOurIme</a></li><li><span class="title-icon "></span><a href="#inputtext"><b>6.2. </b>inputText</a></li><li><span class="title-icon "></span><a href="#imeinputtext"><b>6.3. </b>imeInputText</a></li><li><span class="title-icon "></span><a href="#pastetext"><b>6.4. </b>pasteText</a></li><li><span class="title-icon "></span><a href="#cleartextfield"><b>6.5. </b>clearTextField</a></li></ul><li><span class="title-icon "></span><a href="#&#x8282;&#x70B9;&#x64CD;&#x4F5C;"><b>7. </b>&#x8282;&#x70B9;&#x64CD;&#x4F5C;</a></li><ul><li><span class="title-icon "></span><a href="#has"><b>7.1. </b>has</a></li><li><span class="title-icon "></span><a href="#waitexistactivity"><b>7.2. </b>waitExistActivity</a></li><li><span class="title-icon "></span><a href="#waitexistnode"><b>7.3. </b>waitExistNode</a></li><li><span class="title-icon "></span><a href="#gettext"><b>7.4. </b>getText</a></li><li><span class="title-icon "></span><a href="#getnodeinfo"><b>7.5. </b>getNodeInfo</a></li><li><span class="title-icon "></span><a href="#getnodeattrs"><b>7.6. </b>getNodeAttrs</a></li><li><span class="title-icon "></span><a href="#getonenodeinfo"><b>7.7. </b>getOneNodeInfo</a></li><li><span class="title-icon "></span><a href="#setfetchnodemode"><b>7.8. </b>setFetchNodeMode</a></li><li><span class="title-icon "></span><a href="#dumpxml"><b>7.9. </b>dumpXml</a></li></ul><li><span class="title-icon "></span><a href="#&#x7CFB;&#x7EDF;&#x6309;&#x952E;&#x76F8;&#x5173;"><b>8. </b>&#x7CFB;&#x7EDF;&#x6309;&#x952E;&#x76F8;&#x5173;</a></li><ul><li><span class="title-icon "></span><a href="#home"><b>8.1. </b>home</a></li><li><span class="title-icon "></span><a href="#back"><b>8.2. </b>back</a></li><li><span class="title-icon "></span><a href="#opennotification"><b>8.3. </b>openNotification</a></li><li><span class="title-icon "></span><a href="#openquicksettings"><b>8.4. </b>openQuickSettings</a></li><li><span class="title-icon "></span><a href="#recentapps"><b>8.5. </b>recentApps</a></li><li><span class="title-icon "></span><a href="#getrunningpkg"><b>8.6. </b>getRunningPkg</a></li><li><span class="title-icon "></span><a href="#getrunningactivity"><b>8.7. </b>getRunningActivity</a></li></ul><li><span class="title-icon "></span><a href="#&#x901A;&#x77E5;&#x680F;"><b>9. </b>&#x901A;&#x77E5;&#x680F;</a></li><ul><li><span class="title-icon "></span><a href="#requestnotificationpermission"><b>9.1. </b>requestNotificationPermission</a></li><li><span class="title-icon "></span><a href="#hasnotificationpermission"><b>9.2. </b>hasNotificationPermission</a></li><li><span class="title-icon "></span><a href="#getlastnotification"><b>9.3. </b>getLastNotification</a></li><li><span class="title-icon "></span><a href="#shotnotification"><b>9.4. </b>shotNotification</a></li><li><span class="title-icon "></span><a href="#cancelnotification"><b>9.5. </b>cancelNotification</a></li><li><span class="title-icon "></span><a href="#getlasttoast"><b>9.6. </b>getLastToast</a></li></ul><li><span class="title-icon "></span><a href="#&#x60AC;&#x6D6E;&#x7A97;&#x65E5;&#x5FD7;"><b>10. </b>&#x60AC;&#x6D6E;&#x7A97;&#x65E5;&#x5FD7;</a></li><ul><li><span class="title-icon "></span><a href="#requestfloatviewpermission"><b>10.1. </b>requestFloatViewPermission</a></li><li><span class="title-icon "></span><a href="#hasfloatviewpermission"><b>10.2. </b>hasFloatViewPermission</a></li><li><span class="title-icon "></span><a href="#showfloatview"><b>10.3. </b>showFloatView</a></li><li><span class="title-icon "></span><a href="#closefloatview"><b>10.4. </b>closeFloatView</a></li><li><span class="title-icon "></span><a href="#closeallfloatview"><b>10.5. </b>closeAllFloatView</a></li><li><span class="title-icon "></span><a href="#showlogwindow"><b>10.6. </b>showLogWindow</a></li><li><span class="title-icon "></span><a href="#closelogwindow"><b>10.7. </b>closeLogWindow</a></li><li><span class="title-icon "></span><a href="#setlogviewsize"><b>10.8. </b>setLogViewSize</a></li><li><span class="title-icon "></span><a href="#setlogtext"><b>10.9. </b>setLogText</a></li></ul><li><span class="title-icon "></span><a href="#&#x5B9A;&#x65F6;&#x4EFB;&#x52A1;"><b>11. </b>&#x5B9A;&#x65F6;&#x4EFB;&#x52A1;</a></li><ul><li><span class="title-icon "></span><a href="#startjob-&#x5F00;&#x542F;&#x5B9A;&#x65F6;"><b>11.1. </b>startJob &#x5F00;&#x542F;&#x5B9A;&#x65F6;</a></li><li><span class="title-icon "></span><a href="#cancelalljob-&#x53D6;&#x6D88;&#x6240;&#x6709;&#x5B9A;&#x65F6;"><b>11.2. </b>cancelAllJob &#x53D6;&#x6D88;&#x6240;&#x6709;&#x5B9A;&#x65F6;</a></li><li><span class="title-icon "></span><a href="#canceljob-&#x53D6;&#x6D88;&#x6307;&#x5B9A;tag&#x5B9A;&#x65F6;"><b>11.3. </b>cancelJob &#x53D6;&#x6D88;&#x6307;&#x5B9A;TAG&#x5B9A;&#x65F6;</a></li><li><span class="title-icon "></span><a href="#getalljobtag-&#x83B7;&#x53D6;&#x6240;&#x6709;&#x5B9A;&#x65F6;&#x6807;&#x7B7E;"><b>11.4. </b>getAllJobTag &#x83B7;&#x53D6;&#x6240;&#x6709;&#x5B9A;&#x65F6;&#x6807;&#x7B7E;</a></li></ul><li><span class="title-icon "></span><a href="#&#x5176;&#x4ED6;&#x51FD;&#x6570;"><b>12. </b>&#x5176;&#x4ED6;&#x51FD;&#x6570;</a></li><ul><li><span class="title-icon "></span><a href="#random-&#x968F;&#x673A;&#x51FD;&#x6570;"><b>12.1. </b>random &#x968F;&#x673A;&#x51FD;&#x6570;</a></li></ul></ul></div><a href="#&#x8BF4;&#x660E;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="&#x8BF4;&#x660E;"><a name="&#x8BF4;&#x660E;" class="anchor-navigation-ex-anchor" href="#&#x8BF4;&#x660E;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x8BF4;&#x660E;</h1>
<p>&#x5168;&#x5C40;&#x6A21;&#x5757;&#x4E2D;&#x5C01;&#x88C5;&#x7684;&#x5FEB;&#x6377;&#x4E8B;&#x4EF6;&#xFF0C;&#x4E0D;&#x7528;&#x533A;&#x5206;&#x662F;&#x65E0;&#x969C;&#x788D;&#x6A21;&#x5F0F;&#x8FD8;&#x662F;&#x4EE3;&#x7406;&#x6A21;&#x5F0F;</p>
<h1 id="&#x70B9;&#x51FB;&#x51FD;&#x6570;"><a name="&#x70B9;&#x51FB;&#x51FD;&#x6570;" class="anchor-navigation-ex-anchor" href="#&#x70B9;&#x51FB;&#x51FD;&#x6570;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x70B9;&#x51FB;&#x51FD;&#x6570;</h1>
<h2 id="clickpoint"><a name="clickpoint" class="anchor-navigation-ex-anchor" href="#clickpoint"><i class="fa fa-link" aria-hidden="true"></i></a>2.1. clickPoint</h2>
<ul>
<li>&#x70B9;&#x51FB;&#x5750;&#x6807;</li>
<li>@param x x&#x5750;&#x6807;</li>
<li>@param y y&#x5750;&#x6807;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = clickPoint(<span class="hljs-number">100</span>,<span class="hljs-number">100</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="click"><a name="click" class="anchor-navigation-ex-anchor" href="#click"><i class="fa fa-link" aria-hidden="true"></i></a>2.2. click</h2>
<ul>
<li>&#x70B9;&#x51FB;&#x9009;&#x62E9;&#x5668;</li>
<li>@param selectors &#x9009;&#x62E9;&#x5668;&#x5BF9;&#x8C61;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selector = text(<span class="hljs-string">&quot;&#x6211;&#x662F;&#x6587;&#x672C;&quot;</span>);
    <span class="hljs-keyword">var</span> result = click(selector);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="clickrandom"><a name="clickrandom" class="anchor-navigation-ex-anchor" href="#clickrandom"><i class="fa fa-link" aria-hidden="true"></i></a>2.3. clickRandom</h2>
<ul>
<li>&#x968F;&#x673A;&#x70B9;&#x51FB;&#x9009;&#x62E9;&#x5668;&#x7684;&#x4EFB;&#x610F;&#x5143;&#x7D20;</li>
<li>@param selectors &#x9009;&#x62E9;&#x5668;&#x5BF9;&#x8C61;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selector = text(<span class="hljs-string">&quot;&#x6211;&#x662F;&#x6587;&#x672C;&quot;</span>);
    <span class="hljs-keyword">var</span> result = clickRandom(selector);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="clickrandomrect"><a name="clickrandomrect" class="anchor-navigation-ex-anchor" href="#clickrandomrect"><i class="fa fa-link" aria-hidden="true"></i></a>2.4. clickRandomRect</h2>
<ul>
<li>&#x968F;&#x673A;&#x70B9;&#x51FB;&#x533A;&#x57DF;&#x4E2D;&#x7684;&#x5750;&#x6807;</li>
<li>@param rect &#x533A;&#x57DF;&#x5BF9;&#x8C61;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> rect = <span class="hljs-keyword">new</span> Rect();
    rect.left = <span class="hljs-number">10</span>;
    rect.right = <span class="hljs-number">200</span>;
    rect.top = <span class="hljs-number">10</span>;
    rect.bottom = <span class="hljs-number">400</span>;
    <span class="hljs-keyword">var</span> result = clickRandomRect(rect);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="clickcenter"><a name="clickcenter" class="anchor-navigation-ex-anchor" href="#clickcenter"><i class="fa fa-link" aria-hidden="true"></i></a>2.5. clickCenter</h2>
<ul>
<li>&#x70B9;&#x51FB;&#x533A;&#x57DF;&#x4E2D;&#x7684;&#x4E2D;&#x5FC3;&#x5750;&#x6807;</li>
<li>@param rect &#x533A;&#x57DF;&#x5BF9;&#x8C61;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> rect = <span class="hljs-keyword">new</span> Rect();
    rect.left = <span class="hljs-number">10</span>;
    rect.right = <span class="hljs-number">200</span>;
    rect.top = <span class="hljs-number">10</span>;
    rect.bottom = <span class="hljs-number">400</span>;
    <span class="hljs-keyword">var</span> result = clickCenter(rect);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="clicktext"><a name="clicktext" class="anchor-navigation-ex-anchor" href="#clicktext"><i class="fa fa-link" aria-hidden="true"></i></a>2.6. clickText</h2>
<ul>
<li>&#x70B9;&#x51FB;&#x6587;&#x672C;</li>
<li>@param text &#x6587;&#x672C;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
  <span class="hljs-keyword">var</span> result = clickText(<span class="hljs-string">&quot;&#x8BBE;&#x7F6E;&quot;</span>);
  <span class="hljs-keyword">if</span> (result){
       toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x6210;&#x529F;&quot;</span>);
  } <span class="hljs-keyword">else</span> {
    toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x5931;&#x8D25;&quot;</span>);
  }
}
main();
</code></pre>
</blockquote>
<h2 id="longclick"><a name="longclick" class="anchor-navigation-ex-anchor" href="#longclick"><i class="fa fa-link" aria-hidden="true"></i></a>2.7. longClick</h2>
<ul>
<li>&#x957F;&#x70B9;&#x51FB;&#x9009;&#x62E9;&#x5668;</li>
<li>@param selectors &#x9009;&#x62E9;&#x5668;&#x5BF9;&#x8C61;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selector = text(<span class="hljs-string">&quot;&#x6211;&#x662F;&#x6587;&#x672C;&quot;</span>);
    <span class="hljs-keyword">var</span> result = longClick(selector);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x5931;&#x8D25;&quot;</span>);
    }
}

main();
</code></pre>
</blockquote>
<h2 id="longclickpoint"><a name="longclickpoint" class="anchor-navigation-ex-anchor" href="#longclickpoint"><i class="fa fa-link" aria-hidden="true"></i></a>2.8. longClickPoint</h2>
<ul>
<li>&#x957F;&#x70B9;&#x51FB;&#x5750;&#x6807;</li>
<li>@param x x&#x5750;&#x6807;</li>
<li>@param y y&#x5750;&#x6807;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = longClickPoint(<span class="hljs-number">100</span>,<span class="hljs-number">100</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x70B9;&#x51FB;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h1 id="&#x591A;&#x70B9;&#x89E6;&#x6478;"><a name="&#x591A;&#x70B9;&#x89E6;&#x6478;" class="anchor-navigation-ex-anchor" href="#&#x591A;&#x70B9;&#x89E6;&#x6478;"><i class="fa fa-link" aria-hidden="true"></i></a>3. &#x591A;&#x70B9;&#x89E6;&#x6478;</h1>
<h2 id="multitouch-&#x591A;&#x70B9;&#x89E6;&#x6478;"><a name="multitouch-&#x591A;&#x70B9;&#x89E6;&#x6478;" class="anchor-navigation-ex-anchor" href="#multitouch-&#x591A;&#x70B9;&#x89E6;&#x6478;"><i class="fa fa-link" aria-hidden="true"></i></a>3.1. multiTouch &#x591A;&#x70B9;&#x89E6;&#x6478;</h2>
<ul>
<li>&#x591A;&#x70B9;&#x89E6;&#x6478;<br></li>
<li>&#x89E6;&#x6478;&#x53C2;&#x6570;: action :&#x4E00;&#x822C;&#x60C5;&#x51B5;&#x4E0B; &#x6309;&#x4E0B;&#x4E3A;0&#xFF0C;&#x5F39;&#x8D77;&#x4E3A;1&#xFF0C;&#x79FB;&#x52A8;&#x4E3A;2</li>
<li>x: X&#x5750;&#x6807;</li>
<li>y: Y&#x5750;&#x6807;</li>
<li>pointer&#xFF1A;&#x8BBE;&#x7F6E;&#x7B2C;&#x51E0;&#x4E2A;&#x624B;&#x6307;&#x89E6;&#x6478;&#x70B9;&#xFF0C;&#x5206;&#x522B;&#x662F; 1&#xFF0C;2&#xFF0C;3&#x7B49;&#xFF0C;&#x4EE3;&#x8868;&#x7B2C;n&#x4E2A;&#x624B;&#x6307;</li>
<li>delay: &#x8BE5;&#x52A8;&#x4F5C;&#x5EF6;&#x8FDF;&#x591A;&#x5C11;&#x6BEB;&#x79D2;&#x6267;&#x884C;</li>
<li>@param touch1 &#x7B2C;1&#x4E2A;&#x624B;&#x6307;&#x7684;&#x89E6;&#x6478;&#x70B9;&#x6570;&#x7EC4;,&#x4F8B;&#x5982;&#xFF1A;[{&quot;action&quot;:0,&quot;x&quot;:1,&quot;y&quot;:1,&quot;pointer&quot;:1,&quot;delay&quot;:20},{&quot;action&quot;:2,&quot;x&quot;:1,&quot;y&quot;:1,&quot;pointer&quot;:1,&quot;delay&quot;:20}]</li>
<li>@param touch2 &#x7B2C;2&#x4E2A;&#x624B;&#x6307;&#x7684;&#x89E6;&#x6478;&#x70B9;&#x6570;&#x7EC4;</li>
<li>@param touch3 &#x7B2C;3&#x4E2A;&#x624B;&#x6307;&#x7684;&#x89E6;&#x6478;&#x70B9;&#x6570;&#x7EC4;</li>
<li>@param timeout &#x591A;&#x70B9;&#x89E6;&#x6478;&#x6267;&#x884C;&#x7684;&#x8D85;&#x65F6;&#x65F6;&#x95F4;&#xFF0C;&#x5355;&#x4F4D;&#x662F;&#x6BEB;&#x79D2;</li>
<li>@return boolean|&#x5E03;&#x5C14;&#x578B;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>) </span>{
   utils.openAppByName(<span class="hljs-string">&quot;&#x6296;&#x97F3;&#x77ED;&#x89C6;&#x9891;&quot;</span>);
   sleep(<span class="hljs-number">3000</span>);
  <span class="hljs-comment">//&#x7B2C;&#x4E00;&#x79CD;&#x6570;&#x7EC4;&#x5F0F;&#x7684;&#x5199;&#x6CD5;</span>
   <span class="hljs-keyword">var</span> touch1 = [

       {<span class="hljs-string">&quot;action&quot;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&quot;x&quot;</span>: <span class="hljs-number">500</span>, <span class="hljs-string">&quot;y&quot;</span>: <span class="hljs-number">1200</span>, <span class="hljs-string">&quot;pointer&quot;</span>: <span class="hljs-number">1</span>, <span class="hljs-string">&quot;delay&quot;</span>: <span class="hljs-number">1</span>},
       {
           <span class="hljs-string">&quot;action&quot;</span>: <span class="hljs-number">2</span>,
           <span class="hljs-string">&quot;x&quot;</span>: <span class="hljs-number">500</span>,
           <span class="hljs-string">&quot;y&quot;</span>: <span class="hljs-number">1100</span>,
           <span class="hljs-string">&quot;pointer&quot;</span>: <span class="hljs-number">1</span>,
           <span class="hljs-string">&quot;delay&quot;</span>: <span class="hljs-number">20</span>
       }, {
           <span class="hljs-string">&quot;action&quot;</span>: <span class="hljs-number">2</span>,
           <span class="hljs-string">&quot;x&quot;</span>: <span class="hljs-number">500</span>,
           <span class="hljs-string">&quot;y&quot;</span>: <span class="hljs-number">1000</span>,
           <span class="hljs-string">&quot;pointer&quot;</span>: <span class="hljs-number">1</span>,
           <span class="hljs-string">&quot;delay&quot;</span>: <span class="hljs-number">20</span>
       },
       {
           <span class="hljs-string">&quot;action&quot;</span>: <span class="hljs-number">1</span>,
           <span class="hljs-string">&quot;x&quot;</span>: <span class="hljs-number">1</span>,
           <span class="hljs-string">&quot;y&quot;</span>: <span class="hljs-number">1</span>,
           <span class="hljs-string">&quot;pointer&quot;</span>: <span class="hljs-number">1</span>,
           <span class="hljs-string">&quot;delay&quot;</span>: <span class="hljs-number">20</span>
       }];


  <span class="hljs-comment">//&#x7B2C;&#x4E8C;&#x79CD;&#x94FE;&#x5F0F;&#x8C03;&#x7528;&#x65B9;&#x6CD5;</span>
   <span class="hljs-keyword">var</span> touch2 = MultiPoint
       .get()
       .action(<span class="hljs-number">0</span>).x(<span class="hljs-number">500</span>).y(<span class="hljs-number">1200</span>).pointer(<span class="hljs-number">1</span>).delay(<span class="hljs-number">1</span>)
       .next()
       .action(<span class="hljs-number">2</span>).x(<span class="hljs-number">500</span>).y(<span class="hljs-number">1100</span>).pointer(<span class="hljs-number">1</span>).delay(<span class="hljs-number">1</span>)
       .next()
       .action(<span class="hljs-number">2</span>).x(<span class="hljs-number">500</span>).y(<span class="hljs-number">1000</span>).pointer(<span class="hljs-number">1</span>).delay(<span class="hljs-number">1</span>)
       .next()
       .action(<span class="hljs-number">2</span>).x(<span class="hljs-number">500</span>).y(<span class="hljs-number">900</span>).pointer(<span class="hljs-number">1</span>).delay(<span class="hljs-number">1</span>)
       .next()
       .action(<span class="hljs-number">1</span>).x(<span class="hljs-number">500</span>).y(<span class="hljs-number">800</span>).pointer(<span class="hljs-number">1</span>).delay(<span class="hljs-number">1</span>);
   <span class="hljs-keyword">var</span> touch1 = MultiPoint
       .get()
       .action(<span class="hljs-number">0</span>).x(<span class="hljs-number">300</span>).y(<span class="hljs-number">1200</span>).pointer(<span class="hljs-number">2</span>).delay(<span class="hljs-number">1</span>)
       .next()
       .action(<span class="hljs-number">2</span>).x(<span class="hljs-number">300</span>).y(<span class="hljs-number">1100</span>).pointer(<span class="hljs-number">2</span>).delay(<span class="hljs-number">1</span>)
       .next()
       .action(<span class="hljs-number">2</span>).x(<span class="hljs-number">300</span>).y(<span class="hljs-number">1000</span>).pointer(<span class="hljs-number">2</span>).delay(<span class="hljs-number">1</span>)
       .next()
       .action(<span class="hljs-number">2</span>).x(<span class="hljs-number">300</span>).y(<span class="hljs-number">900</span>).pointer(<span class="hljs-number">2</span>).delay(<span class="hljs-number">1</span>)
       .next()
       .action(<span class="hljs-number">1</span>).x(<span class="hljs-number">300</span>).y(<span class="hljs-number">800</span>).pointer(<span class="hljs-number">2</span>).delay(<span class="hljs-number">1</span>);
   <span class="hljs-keyword">var</span> x = multiTouch(touch1, touch2, <span class="hljs-literal">null</span>, <span class="hljs-number">30000</span>);
   logd(<span class="hljs-string">&quot;xxs &quot;</span> + x);
}
main();
</code></pre>
</blockquote>
<h1 id="&#x6ED1;&#x52A8;&#x51FD;&#x6570;"><a name="&#x6ED1;&#x52A8;&#x51FD;&#x6570;" class="anchor-navigation-ex-anchor" href="#&#x6ED1;&#x52A8;&#x51FD;&#x6570;"><i class="fa fa-link" aria-hidden="true"></i></a>4. &#x6ED1;&#x52A8;&#x51FD;&#x6570;</h1>
<h2 id="swipe"><a name="swipe" class="anchor-navigation-ex-anchor" href="#swipe"><i class="fa fa-link" aria-hidden="true"></i></a>4.1. swipe</h2>
<ul>
<li>&#x901A;&#x8FC7;&#x9009;&#x62E9;&#x5668;&#x6ED1;&#x52A8;&#x8282;&#x70B9;</li>
<li>@param selectors &#x8282;&#x70B9;&#x9009;&#x62E9;&#x5668;</li>
<li>@param endX      &#x7ED3;&#x675F;&#x7684;X&#x5750;&#x6807;</li>
<li>@param endY      &#x7ED3;&#x675F;&#x7684;Y&#x5750;&#x6807;</li>
<li>@param duration &#x6301;&#x7EED;&#x65F6;&#x957F; &#x5355;&#x4F4D;&#x6BEB;&#x79D2;</li>
<li>@return &#x5E03;&#x5C14;&#x578B; true &#x4EE3;&#x8868;&#x6210;&#x529F; false &#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors = text(<span class="hljs-string">&quot;&#x6211;&#x662F;&#x6587;&#x672C;&quot;</span>);
    <span class="hljs-keyword">var</span> result = swipe(selectors,<span class="hljs-number">100</span>,<span class="hljs-number">100</span>,<span class="hljs-number">200</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x6ED1;&#x52A8;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x6ED1;&#x52A8;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="swipetopoint"><a name="swipetopoint" class="anchor-navigation-ex-anchor" href="#swipetopoint"><i class="fa fa-link" aria-hidden="true"></i></a>4.2. swipeToPoint</h2>
<ul>
<li>&#x4ECE;&#x4E00;&#x4E2A;&#x5750;&#x6807;&#x6ED1;&#x52A8;&#x5230;&#x53E6;&#x4E00;&#x4E2A;&#x5750;&#x6807;</li>
<li>@param startX &#x8D77;&#x59CB;&#x5750;&#x6807;&#x7684;X&#x8F74;&#x503C;</li>
<li>@param startY &#x8D77;&#x59CB;&#x5750;&#x6807;&#x7684;Y&#x8F74;&#x503C;</li>
<li>@param endX   &#x7ED3;&#x675F;&#x5750;&#x6807;&#x7684;X&#x8F74;&#x503C;</li>
<li>@param endY   &#x7ED3;&#x675F;&#x5750;&#x6807;&#x7684;Y&#x8F74;&#x503C;</li>
<li>@param duration &#x6301;&#x7EED;&#x65F6;&#x957F; &#x5355;&#x4F4D;&#x6BEB;&#x79D2;</li>
<li>@return &#x5E03;&#x5C14;&#x578B; true &#x6ED1;&#x52A8;&#x6210;&#x529F;, false &#x6ED1;&#x52A8;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = swipeToPoint(<span class="hljs-number">10</span>,<span class="hljs-number">10</span>,<span class="hljs-number">100</span>,<span class="hljs-number">100</span>,<span class="hljs-number">200</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x6ED1;&#x52A8;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x6ED1;&#x52A8;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="isscrollend"><a name="isscrollend" class="anchor-navigation-ex-anchor" href="#isscrollend"><i class="fa fa-link" aria-hidden="true"></i></a>4.3. isScrollEnd</h2>
<ul>
<li>&#x662F;&#x5426;&#x6EDA;&#x52A8;&#x5230;&#x5E95;&#x90E8;&#x4E86;&#xFF0C;&#x5982;&#x679C;&#x67E5;&#x4E0D;&#x5230;&#x5143;&#x7D20;&#x4E5F;&#x4F1A;&#x8FD4;&#x56DE;false</li>
<li>@param distance &#x6EDA;&#x52A8;&#x65B9;&#x5411; UP,DOWN,LEFT,RIGHT</li>
<li>@param selectors &#x9009;&#x62E9;&#x5668;</li>
<li>@return false &#x4EE3;&#x8868;&#x672A;&#x6EDA;&#x52A8;&#x5230;&#x4F4D;&#xFF0C;true &#x4EE3;&#x8868;&#x6EDA;&#x52A8;&#x5B8C;&#x6210;&#x4E86;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors = clz(<span class="hljs-string">&quot;android.widget.ListView&quot;</span>);
    <span class="hljs-keyword">var</span> result = isScrollEnd(<span class="hljs-string">&quot;UP&quot;</span>,selectors);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x6EDA;&#x52A8;&#x5B8C;&#x6210;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x6EDA;&#x52A8;&#x672A;&#x5B8C;&#x6210;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h1 id="&#x62D6;&#x52A8;&#x51FD;&#x6570;"><a name="&#x62D6;&#x52A8;&#x51FD;&#x6570;" class="anchor-navigation-ex-anchor" href="#&#x62D6;&#x52A8;&#x51FD;&#x6570;"><i class="fa fa-link" aria-hidden="true"></i></a>5. &#x62D6;&#x52A8;&#x51FD;&#x6570;</h1>
<h2 id="drag"><a name="drag" class="anchor-navigation-ex-anchor" href="#drag"><i class="fa fa-link" aria-hidden="true"></i></a>5.1. drag</h2>
<ul>
<li>&#x4ECE;&#x4E00;&#x4E2A;&#x5750;&#x6807;&#x5230;&#x53E6;&#x4E00;&#x4E2A;&#x5750;&#x6807;&#x7684;&#x62D6;&#x52A8;</li>
<li>@param startX &#x8D77;&#x59CB;&#x5750;&#x6807;&#x7684;X&#x8F74;&#x503C;</li>
<li>@param startY &#x8D77;&#x59CB;&#x5750;&#x6807;&#x7684;Y&#x8F74;&#x503C;</li>
<li>@param endX   &#x7ED3;&#x675F;&#x5750;&#x6807;&#x7684;X&#x8F74;&#x503C;</li>
<li>@param endY   &#x7ED3;&#x675F;&#x5750;&#x6807;&#x7684;Y&#x8F74;&#x503C;</li>
<li>@param duration &#x6301;&#x7EED;&#x65F6;&#x957F; &#x5355;&#x4F4D;&#x6BEB;&#x79D2;</li>
<li>@return &#x5E03;&#x5C14;&#x578B; true &#x62D6;&#x52A8;&#x6210;&#x529F;, false &#x62D6;&#x52A8;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = drag(<span class="hljs-number">10</span>,<span class="hljs-number">10</span>,<span class="hljs-number">100</span>,<span class="hljs-number">100</span>,<span class="hljs-number">200</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x62D6;&#x52A8;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x62D6;&#x52A8;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="dragto"><a name="dragto" class="anchor-navigation-ex-anchor" href="#dragto"><i class="fa fa-link" aria-hidden="true"></i></a>5.2. dragTo</h2>
<ul>
<li>&#x901A;&#x8FC7;&#x9009;&#x62E9;&#x5668;&#x62D6;&#x52A8;&#x67D0;&#x4E2A;&#x5143;&#x7D20;&#x5230;&#x76EE;&#x6807;&#x5143;&#x7D20;</li>
<li>@param selectors &#x9009;&#x62E9;&#x5668; {@link S}</li>
<li>@param destObj   &#x76EE;&#x6807;&#x5143;&#x7D20;&#x9009;&#x62E9;&#x5668;</li>
<li>@param duration &#x6301;&#x7EED;&#x65F6;&#x957F; &#x5355;&#x4F4D;&#x6BEB;&#x79D2;</li>
<li>@return &#x5E03;&#x5C14;&#x578B; true &#x6210;&#x529F; false &#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors = text(<span class="hljs-string">&quot;&#x8BBE;&#x7F6E;&quot;</span>);
    <span class="hljs-keyword">var</span> destObj = text(<span class="hljs-string">&quot;&#x65E5;&#x5386;&quot;</span>);
    <span class="hljs-keyword">var</span> result = dragTo(selectors,destObj,<span class="hljs-number">200</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x62D6;&#x52A8;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x62D6;&#x52A8;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="dragtopoint"><a name="dragtopoint" class="anchor-navigation-ex-anchor" href="#dragtopoint"><i class="fa fa-link" aria-hidden="true"></i></a>5.3. dragToPoint</h2>
<ul>
<li>&#x901A;&#x8FC7;&#x9009;&#x62E9;&#x5668;&#x62D6;&#x52A8;&#x67D0;&#x4E2A;&#x5143;&#x7D20;&#x5230;&#x76EE;&#x6807;X Y &#x5750;&#x6807;</li>
<li>@param selectors &#x539F;&#x59CB;&#x5143;&#x7D20;&#x9009;&#x62E9;&#x5668;</li>
<li>@param endX      &#x76EE;&#x6807; X &#x5750;&#x6807;</li>
<li>@param endY      &#x76EE;&#x6807; Y &#x5750;&#x6807;</li>
<li>@param duration &#x6301;&#x7EED;&#x65F6;&#x957F; &#x5355;&#x4F4D;&#x6BEB;&#x79D2;</li>
<li>@return &#x5E03;&#x5C14;&#x578B; true &#x6210;&#x529F; false &#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors = text(<span class="hljs-string">&quot;&#x8BBE;&#x7F6E;&quot;</span>);
    <span class="hljs-keyword">var</span> result = dragToPoint(selectors,<span class="hljs-number">100</span>,<span class="hljs-number">100</span>,<span class="hljs-number">200</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x62D6;&#x52A8;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x62D6;&#x52A8;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h1 id="&#x8F93;&#x5165;&#x6570;&#x636E;"><a name="&#x8F93;&#x5165;&#x6570;&#x636E;" class="anchor-navigation-ex-anchor" href="#&#x8F93;&#x5165;&#x6570;&#x636E;"><i class="fa fa-link" aria-hidden="true"></i></a>6. &#x8F93;&#x5165;&#x6570;&#x636E;</h1>
<h2 id="currentisourime"><a name="currentisourime" class="anchor-navigation-ex-anchor" href="#currentisourime"><i class="fa fa-link" aria-hidden="true"></i></a>6.1. currentIsOurIme</h2>
<ul>
<li>&#x5F53;&#x524D;&#x662F;&#x5426;&#x662F;&#x6211;&#x4EEC;&#x7684;&#x8F93;&#x5165;&#x6CD5;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = currentIsOurIme();
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x662F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5426;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="inputtext"><a name="inputtext" class="anchor-navigation-ex-anchor" href="#inputtext"><i class="fa fa-link" aria-hidden="true"></i></a>6.2. inputText</h2>
<ul>
<li>&#x901A;&#x8FC7;&#x9009;&#x62E9;&#x5668;&#x8F93;&#x5165;&#x6570;&#x636E;</li>
<li>@param selectors  &#x9009;&#x62E9;&#x5668;</li>
<li>@param content &#x6570;&#x636E;&#x5B57;&#x7B26;&#x4E32;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors= clz(<span class="hljs-string">&quot;android.widget.EditText&quot;</span>);
    <span class="hljs-keyword">var</span> result = inputText(selectors,<span class="hljs-string">&quot;&#x6211;&#x662F;&#x5185;&#x5BB9;&quot;</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x662F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5426;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="imeinputtext"><a name="imeinputtext" class="anchor-navigation-ex-anchor" href="#imeinputtext"><i class="fa fa-link" aria-hidden="true"></i></a>6.3. imeInputText</h2>
<ul>
<li>&#x4F7F;&#x7528;&#x8F93;&#x5165;&#x6CD5;&#x8F93;&#x5165;&#x5185;&#x5BB9;&#xFF0C;&#x524D;&#x63D0;&#x662F;&#x5DF2;&#x7ECF;&#x8BBE;&#x7F6E;&#x672C;&#x7A0B;&#x5E8F;&#x7684;&#x8F93;&#x5165;&#x6CD5;&#x4E3A;&#x9ED8;&#x8BA4;&#x8F93;&#x5165;&#x6CD5;</li>
<li>@param selectors  &#x9009;&#x62E9;&#x5668;</li>
<li>@param content &#x6570;&#x636E;&#x5B57;&#x7B26;&#x4E32;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors= clz(<span class="hljs-string">&quot;android.widget.EditText&quot;</span>);
    <span class="hljs-keyword">var</span> result = imeInputText(selectors,<span class="hljs-string">&quot;&#x6211;&#x662F;&#x5185;&#x5BB9;&quot;</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x662F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5426;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="pastetext"><a name="pastetext" class="anchor-navigation-ex-anchor" href="#pastetext"><i class="fa fa-link" aria-hidden="true"></i></a>6.4. pasteText</h2>
<ul>
<li>&#x901A;&#x8FC7;&#x9009;&#x62E9;&#x5668;&#x7C98;&#x8D34;&#x6570;&#x636E;</li>
<li>@param selectors  &#x9009;&#x62E9;&#x5668;</li>
<li>@param content &#x6570;&#x636E;&#x5B57;&#x7B26;&#x4E32;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors= clz(<span class="hljs-string">&quot;android.widget.EditText&quot;</span>);
    <span class="hljs-keyword">var</span> result = pasteText(selectors,<span class="hljs-string">&quot;&#x6211;&#x662F;&#x5185;&#x5BB9;&quot;</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x662F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5426;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="cleartextfield"><a name="cleartextfield" class="anchor-navigation-ex-anchor" href="#cleartextfield"><i class="fa fa-link" aria-hidden="true"></i></a>6.5. clearTextField</h2>
<ul>
<li>&#x6E05;&#x9664;&#x6587;&#x672C;&#x6570;&#x636E;</li>
<li>@param selectors &#x8282;&#x70B9;&#x9009;&#x62E9;&#x5668;</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors= clz(<span class="hljs-string">&quot;android.widget.EditText&quot;</span>);
    <span class="hljs-keyword">var</span> result = clearTextField(selectors);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x662F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5426;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h1 id="&#x8282;&#x70B9;&#x64CD;&#x4F5C;"><a name="&#x8282;&#x70B9;&#x64CD;&#x4F5C;" class="anchor-navigation-ex-anchor" href="#&#x8282;&#x70B9;&#x64CD;&#x4F5C;"><i class="fa fa-link" aria-hidden="true"></i></a>7. &#x8282;&#x70B9;&#x64CD;&#x4F5C;</h1>
<h2 id="has"><a name="has" class="anchor-navigation-ex-anchor" href="#has"><i class="fa fa-link" aria-hidden="true"></i></a>7.1. has</h2>
<ul>
<li>&#x901A;&#x8FC7;&#x9009;&#x62E9;&#x5668;&#x5224;&#x65AD;&#x5143;&#x7D20;&#x662F;&#x5426;&#x5B58;&#x5728;</li>
<li>@param selectors &#x9009;&#x62E9;&#x5668;</li>
<li>@return {null|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors = text(<span class="hljs-string">&quot;&#x8BBE;&#x7F6E;&quot;</span>);
    <span class="hljs-keyword">var</span> result = has(selectors);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x5B58;&#x5728;&#x8282;&#x70B9;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x4E0D;&#x5B58;&#x5728;&#x8282;&#x70B9;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="waitexistactivity"><a name="waitexistactivity" class="anchor-navigation-ex-anchor" href="#waitexistactivity"><i class="fa fa-link" aria-hidden="true"></i></a>7.2. waitExistActivity</h2>
<ul>
<li>&#x7B49;&#x5F85;activity&#x754C;&#x9762;&#x51FA;&#x73B0;</li>
<li>@param activity &#x754C;&#x9762;&#x540D;&#x79F0;</li>
<li>@param timeout &#x8D85;&#x65F6;&#x65F6;&#x95F4;&#xFF0C;&#x5355;&#x4F4D;&#x6BEB;&#x79D2;</li>
<li>@return {null|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> ac = <span class="hljs-string">&quot;com.ss.android.ugc.aweme.main.MainActivity&quot;</span>;
    <span class="hljs-keyword">var</span> result = waitExistActivity(ac,<span class="hljs-number">10000</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x5B58;&#x5728;&#x754C;&#x9762;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x4E0D;&#x5B58;&#x5728;&#x754C;&#x9762;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="waitexistnode"><a name="waitexistnode" class="anchor-navigation-ex-anchor" href="#waitexistnode"><i class="fa fa-link" aria-hidden="true"></i></a>7.3. waitExistNode</h2>
<ul>
<li>&#x901A;&#x8FC7;&#x9009;&#x62E9;&#x5668;&#x5224;&#x65AD;&#x5E76;&#x7B49;&#x5F85;&#x5143;&#x7D20;&#x662F;&#x5426;&#x5B58;</li>
<li>@param selectors &#x9009;&#x62E9;&#x5668;</li>
<li>@param timeout &#x8D85;&#x65F6;&#x65F6;&#x95F4;&#xFF0C;&#x5355;&#x4F4D;&#x6BEB;&#x79D2;</li>
<li>@return {null|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors = text(<span class="hljs-string">&quot;&#x8BBE;&#x7F6E;&quot;</span>);
    <span class="hljs-keyword">var</span> result = waitExistNode(selectors,<span class="hljs-number">10000</span>);
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x5B58;&#x5728;&#x8282;&#x70B9;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x4E0D;&#x5B58;&#x5728;&#x8282;&#x70B9;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="gettext"><a name="gettext" class="anchor-navigation-ex-anchor" href="#gettext"><i class="fa fa-link" aria-hidden="true"></i></a>7.4. getText</h2>
<ul>
<li>&#x83B7;&#x53D6;&#x9009;&#x62E9;&#x5668;&#x5F97;&#x5230;&#x7684;&#x6587;&#x672C;&#x6570;&#x636E;</li>
<li>@param selectors &#x9009;&#x62E9;&#x5668;</li>
<li>@return {&#x5B57;&#x7B26;&#x4E32;&#x6570;&#x7EC4;|null|&#x5B57;&#x7B26;&#x4E32;&#x96C6;&#x5408;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors = clz(<span class="hljs-string">&quot;android.widget.TextView&quot;</span>);
    <span class="hljs-keyword">var</span> result = getText(selectors);
    toast(<span class="hljs-string">&quot;result:&quot;</span>+result);
}
main();
</code></pre>
</blockquote>
<h2 id="getnodeinfo"><a name="getnodeinfo" class="anchor-navigation-ex-anchor" href="#getnodeinfo"><i class="fa fa-link" aria-hidden="true"></i></a>7.5. getNodeInfo</h2>
<ul>
<li>&#x83B7;&#x53D6;&#x8282;&#x70B9;&#x4FE1;&#x606F;</li>
<li>@param selectors &#x9009;&#x62E9;&#x5668;</li>
<li>@param timeout &#x7B49;&#x5F85;&#x65F6;&#x95F4;&#xFF0C;&#x5355;&#x4F4D;&#x662F;&#x6BEB;&#x79D2;</li>
<li>@return {null|NodeInfo&#x6570;&#x7EC4;|&#x8282;&#x70B9;&#x4FE1;&#x606F;&#x96C6;&#x5408;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = clz(<span class="hljs-string">&quot;android.widget.TextView&quot;</span>).getNodeInfo(<span class="hljs-number">10</span>*<span class="hljs-number">1000</span>);
    toast(<span class="hljs-string">&quot;result:&quot;</span>+result);
}
main();
</code></pre>
</blockquote>
<h2 id="getnodeattrs"><a name="getnodeattrs" class="anchor-navigation-ex-anchor" href="#getnodeattrs"><i class="fa fa-link" aria-hidden="true"></i></a>7.6. getNodeAttrs</h2>
<ul>
<li>&#x83B7;&#x53D6;&#x8282;&#x70B9;&#x5C5E;&#x6027;&#x4FE1;&#x606F;</li>
<li>@param selectors &#x9009;&#x62E9;&#x5668;</li>
<li>@param attr &#x5C5E;&#x6027;&#x503C;,&#x4F8B;&#x5982; text,className&#xFF0C;&#x66F4;&#x591A;&#x7684;&#x5C5E;&#x6027;&#x8BF7;&#x53C2;&#x8003;NodeInfo&#x5BF9;&#x8C61;&#x5C5E;&#x6027;</li>
<li>@return {null|&#x5B57;&#x7B26;&#x4E32;&#x6570;&#x7EC4;|Rect&#x5BF9;&#x8C61;&#x6570;&#x7EC4;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> selectors = clz(<span class="hljs-string">&quot;android.widget.TextView&quot;</span>);
    <span class="hljs-comment">//&#x83B7;&#x53D6;&#x6240;&#x6709;text&#x5C5E;&#x6027;</span>
    <span class="hljs-keyword">var</span> result = getNodeAttrs(selectors,<span class="hljs-string">&quot;text&quot;</span>);
    toast(<span class="hljs-string">&quot;result:&quot;</span>+result);
    <span class="hljs-comment">//&#x83B7;&#x53D6;&#x6240;&#x6709;bounds&#x5C5E;&#x6027;</span>
    result = getNodeAttrs(selectors,<span class="hljs-string">&quot;bounds&quot;</span>);
    toast(<span class="hljs-string">&quot;result:&quot;</span>+result);
}
main();
</code></pre>
</blockquote>
<h2 id="getonenodeinfo"><a name="getonenodeinfo" class="anchor-navigation-ex-anchor" href="#getonenodeinfo"><i class="fa fa-link" aria-hidden="true"></i></a>7.7. getOneNodeInfo</h2>
<ul>
<li>&#x901A;&#x8FC7;&#x9009;&#x62E9;&#x5668; &#x83B7;&#x53D6;&#x7B2C;&#x4E00;&#x4E2A;&#x8282;&#x70B9;&#x4FE1;&#x606F;</li>
<li>@param selectors &#x9009;&#x62E9;&#x5668;</li>
<li>@param timeout &#x7B49;&#x5F85;&#x65F6;&#x95F4;&#xFF0C;&#x5355;&#x4F4D;&#x662F;&#x6BEB;&#x79D2;</li>
<li>@return NodeInfo &#x5BF9;&#x8C61;&#x6216;&#x8005;null</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = clz(<span class="hljs-string">&quot;android.widget.TextView&quot;</span>).getOneNodeInfo(<span class="hljs-number">10</span>*<span class="hljs-number">1000</span>);
    toast(<span class="hljs-string">&quot;result:&quot;</span>+result);
    <span class="hljs-keyword">if</span> (result){
        result.click();
    }
}
main();
</code></pre>
</blockquote>
<h2 id="setfetchnodemode"><a name="setfetchnodemode" class="anchor-navigation-ex-anchor" href="#setfetchnodemode"><i class="fa fa-link" aria-hidden="true"></i></a>7.8. setFetchNodeMode</h2>
<ul>
<li>&#x8BBE;&#x7F6E;&#x83B7;&#x53D6;&#x8282;&#x70B9;&#x7684;&#x6A21;&#x5F0F;</li>
<li>@param mode 1 &#x662F;&#x589E;&#x5F3A;&#x578B;&#xFF0C; 2 &#x662F;&#x5FEB;&#x901F;&#x578B;&#xFF0C;&#x9ED8;&#x8BA4;&#x662F;&#x589E;&#x5F3A;&#x578B;</li>
<li>@param fetchInvisibleNode &#x662F;&#x5426;&#x6293;&#x53D6;&#x9690;&#x85CF;&#x7684;&#x5143;&#x7D20;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E0D;&#x6293;&#x53D6;</li>
<li>@param fetchNotImportantNode &#x662F;&#x5426;&#x6293;&#x53D6;&#x4E0D;&#x91CD;&#x8981;&#x7684;&#x5143;&#x7D20;</li>
<li>@return {boolean|*}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = setFetchNodeMode(<span class="hljs-number">1</span>,<span class="hljs-literal">true</span>,<span class="hljs-literal">true</span>);
    toast(<span class="hljs-string">&quot;result:&quot;</span>+result);
}
main();
</code></pre>
</blockquote>
<h2 id="dumpxml"><a name="dumpxml" class="anchor-navigation-ex-anchor" href="#dumpxml"><i class="fa fa-link" aria-hidden="true"></i></a>7.9. dumpXml</h2>
<ul>
<li>&#x5C06;&#x5143;&#x7D20;&#x8282;&#x70B9;&#x53D8;&#x6210;XML</li>
<li>@return string string|null</li>
</ul>
<blockquote>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = dumpXml();
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;ok&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;no&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h1 id="&#x7CFB;&#x7EDF;&#x6309;&#x952E;&#x76F8;&#x5173;"><a name="&#x7CFB;&#x7EDF;&#x6309;&#x952E;&#x76F8;&#x5173;" class="anchor-navigation-ex-anchor" href="#&#x7CFB;&#x7EDF;&#x6309;&#x952E;&#x76F8;&#x5173;"><i class="fa fa-link" aria-hidden="true"></i></a>8. &#x7CFB;&#x7EDF;&#x6309;&#x952E;&#x76F8;&#x5173;</h1>
<h2 id="home"><a name="home" class="anchor-navigation-ex-anchor" href="#home"><i class="fa fa-link" aria-hidden="true"></i></a>8.1. home</h2>
<ul>
<li>&#x8FD4;&#x56DE;&#x4E3B;&#x9875;</li>
<li>@return {null|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = home();
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="back"><a name="back" class="anchor-navigation-ex-anchor" href="#back"><i class="fa fa-link" aria-hidden="true"></i></a>8.2. back</h2>
<ul>
<li>&#x8FD4;&#x56DE;&#x952E;</li>
<li>@return {null|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = back();
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="opennotification"><a name="opennotification" class="anchor-navigation-ex-anchor" href="#opennotification"><i class="fa fa-link" aria-hidden="true"></i></a>8.3. openNotification</h2>
<ul>
<li>&#x6253;&#x5F00;&#x901A;&#x77E5;&#x680F;</li>
<li>@return {null|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = openNotification();
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="openquicksettings"><a name="openquicksettings" class="anchor-navigation-ex-anchor" href="#openquicksettings"><i class="fa fa-link" aria-hidden="true"></i></a>8.4. openQuickSettings</h2>
<ul>
<li>&#x6253;&#x5F00;&#x5FEB;&#x901F;&#x8BBE;&#x7F6E;</li>
<li>@return {null|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = openQuickSettings();
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="recentapps"><a name="recentapps" class="anchor-navigation-ex-anchor" href="#recentapps"><i class="fa fa-link" aria-hidden="true"></i></a>8.5. recentApps</h2>
<ul>
<li>&#x6700;&#x8FD1;APP&#x4EFB;&#x52A1;&#x6309;&#x952E;</li>
<li>@return {null|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = recentApps();
    <span class="hljs-keyword">if</span> (result){
        toast(<span class="hljs-string">&quot;&#x6210;&#x529F;&quot;</span>);
    } <span class="hljs-keyword">else</span> {
        toast(<span class="hljs-string">&quot;&#x5931;&#x8D25;&quot;</span>);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="getrunningpkg"><a name="getrunningpkg" class="anchor-navigation-ex-anchor" href="#getrunningpkg"><i class="fa fa-link" aria-hidden="true"></i></a>8.6. getRunningPkg</h2>
<ul>
<li>&#x53D6;&#x5F97;&#x5F53;&#x524D;&#x8FD0;&#x884C;&#x7684;App&#x5305;&#x540D;</li>
<li>@return {&#x5B57;&#x7B26;&#x4E32;|null}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = getRunningPkg();
}
main();
</code></pre>
</blockquote>
<h2 id="getrunningactivity"><a name="getrunningactivity" class="anchor-navigation-ex-anchor" href="#getrunningactivity"><i class="fa fa-link" aria-hidden="true"></i></a>8.7. getRunningActivity</h2>
<ul>
<li>&#x53D6;&#x5F97;&#x5F53;&#x524D;&#x8FD0;&#x884C;&#x7684;Activity&#x7C7B;&#x540D;</li>
<li>@return {&#x5B57;&#x7B26;&#x4E32;|null}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = getRunningActivity();
}
main();
</code></pre>
</blockquote>
<h1 id="&#x901A;&#x77E5;&#x680F;"><a name="&#x901A;&#x77E5;&#x680F;" class="anchor-navigation-ex-anchor" href="#&#x901A;&#x77E5;&#x680F;"><i class="fa fa-link" aria-hidden="true"></i></a>9. &#x901A;&#x77E5;&#x680F;</h1>
<h2 id="requestnotificationpermission"><a name="requestnotificationpermission" class="anchor-navigation-ex-anchor" href="#requestnotificationpermission"><i class="fa fa-link" aria-hidden="true"></i></a>9.1. requestNotificationPermission</h2>
<ul>
<li>&#x8BF7;&#x6C42;&#x76D1;&#x542C;&#x72B6;&#x6001;&#x680F;&#x7684;&#x6743;&#x9650;</li>
<li>@param timeout &#x8BF7;&#x6C42;&#x6743;&#x9650;&#x8D85;&#x65F6;&#x65F6;&#x95F4; &#x5355;&#x4F4D;&#x662F;&#x79D2;</li>
<li>@return true &#x4EE3;&#x8868;&#x8BF7;&#x6C42;&#x6743;&#x9650;&#x6210;&#x529F;&#xFF0C;false&#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = requestNotificationPermission(<span class="hljs-number">10</span>);
    toast(<span class="hljs-string">&quot;&#x662F;&#x5426;&#x6709;&#x6743;&#x9650;:&quot;</span>+result);
}
main();
</code></pre>
</blockquote>
<h2 id="hasnotificationpermission"><a name="hasnotificationpermission" class="anchor-navigation-ex-anchor" href="#hasnotificationpermission"><i class="fa fa-link" aria-hidden="true"></i></a>9.2. hasNotificationPermission</h2>
<ul>
<li>&#x68C0;&#x67E5;&#x662F;&#x5426;&#x542B;&#x6709;&#x72B6;&#x6001;&#x680F;&#x76D1;&#x542C;&#x6743;&#x9650;</li>
<li>@return true &#x4EE3;&#x8868;&#x8BF7;&#x6C42;&#x6743;&#x9650;&#x6210;&#x529F;&#xFF0C;false&#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = hasNotificationPermission();
    toast(<span class="hljs-string">&quot;&#x662F;&#x5426;&#x6709;&#x6743;&#x9650;:&quot;</span>+result);
}
main();
</code></pre>
</blockquote>
<h2 id="getlastnotification"><a name="getlastnotification" class="anchor-navigation-ex-anchor" href="#getlastnotification"><i class="fa fa-link" aria-hidden="true"></i></a>9.3. getLastNotification</h2>
<ul>
<li>&#x83B7;&#x53D6;&#x6700;&#x8FD1;&#x901A;&#x77E5;&#x680F;&#x5BF9;&#x8C61;</li>
<li>@param pkg &#x6307;&#x5B9A;&#x5305;&#x540D;</li>
<li>@param size &#x6307;&#x5B9A;&#x83B7;&#x53D6;&#x7684;&#x6761;&#x6570;</li>
<li>@return {NotificationInfo&#x6570;&#x7EC4;|null}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-comment">//&#x83B7;&#x53D6;&#x5FAE;&#x4FE1;100&#x6761;&#x901A;&#x77E5;&#x680F;&#x8BB0;&#x5F55;</span>
    <span class="hljs-keyword">var</span> result = getLastNotification(<span class="hljs-string">&quot;com.tencent.mm&quot;</span>,<span class="hljs-number">100</span>);
    toast(<span class="hljs-string">&quot;&#x7ED3;&#x679C;:&quot;</span>+result);
}
main();
</code></pre>
</blockquote>
<h2 id="shotnotification"><a name="shotnotification" class="anchor-navigation-ex-anchor" href="#shotnotification"><i class="fa fa-link" aria-hidden="true"></i></a>9.4. shotNotification</h2>
<ul>
<li>&#x5C06;&#x901A;&#x77E5;&#x53D1;&#x5C04;&#x5904;&#x7406;&#xFF0C;&#x76F8;&#x5F53;&#x4E8E;&#x70B9;&#x51FB;&#x4E86;&#x901A;&#x77E5;&#x680F;</li>
<li>@param seqId</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-comment">//&#x83B7;&#x53D6;&#x5FAE;&#x4FE1;1&#x6761;&#x901A;&#x77E5;&#xFF0C;&#x7136;&#x540E;&#x8FDB;&#x884C;&#x70B9;&#x51FB;</span>
    <span class="hljs-keyword">var</span> result = getLastNotification(<span class="hljs-string">&quot;com.tencent.mm&quot;</span>,<span class="hljs-number">1</span>);
    <span class="hljs-keyword">if</span> (result!=<span class="hljs-literal">null</span> &amp;&amp; result.length&gt;<span class="hljs-number">0</span>){
        <span class="hljs-keyword">var</span> s = shotNotification(result[<span class="hljs-number">0</span>].seqId);
        toast(<span class="hljs-string">&quot;&#x7ED3;&#x679C;:&quot;</span>+s);
    }   
}
main();
</code></pre>
</blockquote>
<h2 id="cancelnotification"><a name="cancelnotification" class="anchor-navigation-ex-anchor" href="#cancelnotification"><i class="fa fa-link" aria-hidden="true"></i></a>9.5. cancelNotification</h2>
<ul>
<li>&#x5C06;&#x901A;&#x77E5;&#x8FDB;&#x884C;&#x53D6;&#x6D88;&#x64CD;&#x4F5C;</li>
<li>@param seqId</li>
<li>@return {boolean|&#x5E03;&#x5C14;&#x578B;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-comment">//&#x83B7;&#x53D6;&#x5FAE;&#x4FE1;1&#x6761;&#x901A;&#x77E5;&#xFF0C;&#x7136;&#x540E;&#x8FDB;&#x884C;&#x53D6;&#x6D88;</span>
    <span class="hljs-keyword">var</span> result = getLastNotification(<span class="hljs-string">&quot;com.tencent.mm&quot;</span>,<span class="hljs-number">1</span>);
    <span class="hljs-keyword">if</span> (result!=<span class="hljs-literal">null</span> &amp;&amp; result.length&gt;<span class="hljs-number">0</span>){
        <span class="hljs-keyword">var</span> s = cancelNotification(result[<span class="hljs-number">0</span>].seqId);
        toast(<span class="hljs-string">&quot;&#x7ED3;&#x679C;:&quot;</span>+s);
    }
}
main();
</code></pre>
</blockquote>
<h2 id="getlasttoast"><a name="getlasttoast" class="anchor-navigation-ex-anchor" href="#getlasttoast"><i class="fa fa-link" aria-hidden="true"></i></a>9.6. getLastToast</h2>
<ul>
<li>&#x83B7;&#x53D6;toast&#x6570;&#x636E;</li>
<li>@param pkg &#x6307;&#x5B9A;&#x5305;&#x540D;</li>
<li>@param size &#x6307;&#x5B9A;&#x83B7;&#x53D6;&#x7684;&#x6761;&#x6570;</li>
<li>@return {null|ToastInfo&#x6570;&#x7EC4;}</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = getLastToast(<span class="hljs-string">&quot;com.tencent.mm&quot;</span>,<span class="hljs-number">100</span>);
    toast(<span class="hljs-string">&quot;&#x7ED3;&#x679C;:&quot;</span>+result);
}
main();
</code></pre>
</blockquote>
<h1 id="&#x60AC;&#x6D6E;&#x7A97;&#x65E5;&#x5FD7;"><a name="&#x60AC;&#x6D6E;&#x7A97;&#x65E5;&#x5FD7;" class="anchor-navigation-ex-anchor" href="#&#x60AC;&#x6D6E;&#x7A97;&#x65E5;&#x5FD7;"><i class="fa fa-link" aria-hidden="true"></i></a>10. &#x60AC;&#x6D6E;&#x7A97;&#x65E5;&#x5FD7;</h1>
<h2 id="requestfloatviewpermission"><a name="requestfloatviewpermission" class="anchor-navigation-ex-anchor" href="#requestfloatviewpermission"><i class="fa fa-link" aria-hidden="true"></i></a>10.1. requestFloatViewPermission</h2>
<ul>
<li>&#x8BF7;&#x6C42;&#x5C55;&#x793A;&#x6D6E;&#x7A97;&#x7684;&#x6743;&#x9650;</li>
<li>@param timeout &#x8BF7;&#x6C42;&#x6743;&#x9650;&#x8D85;&#x65F6;&#x65F6;&#x95F4; &#x5355;&#x4F4D;&#x662F;&#x79D2;</li>
<li>@return true &#x4EE3;&#x8868;&#x8BF7;&#x6C42;&#x6743;&#x9650;&#x6210;&#x529F;&#xFF0C;false&#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = requestFloatViewPermission(<span class="hljs-number">10</span>);
    toast(<span class="hljs-string">&quot;&#x662F;&#x5426;&#x6709;&#x6743;&#x9650;:&quot;</span>+result);
}
main();
</code></pre>
</blockquote>
<h2 id="hasfloatviewpermission"><a name="hasfloatviewpermission" class="anchor-navigation-ex-anchor" href="#hasfloatviewpermission"><i class="fa fa-link" aria-hidden="true"></i></a>10.2. hasFloatViewPermission</h2>
<ul>
<li>&#x68C0;&#x67E5;&#x662F;&#x5426;&#x542B;&#x6709;&#x6D6E;&#x7A97;&#x6743;&#x9650;</li>
<li>@return true &#x4EE3;&#x8868;&#x8BF7;&#x6C42;&#x6743;&#x9650;&#x6210;&#x529F;&#xFF0C;false&#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = hasFloatViewPermission();
    toast(<span class="hljs-string">&quot;&#x662F;&#x5426;&#x6709;&#x6743;&#x9650;:&quot;</span>+result);
}
main();
</code></pre>
</blockquote>
<h2 id="showfloatview"><a name="showfloatview" class="anchor-navigation-ex-anchor" href="#showfloatview"><i class="fa fa-link" aria-hidden="true"></i></a>10.3. showFloatView</h2>
<ul>
<li>&#x5C55;&#x793A;&#x6D6E;&#x7A97;&#xFF08;&#x5982;&#x679C;&#x662F;&#x5F00;&#x53D1;&#x5DE5;&#x5177;&#x8C03;&#x8BD5;&#xFF0C;&#x8BF7;&#x5148;&#x9884;&#x89C8;&#x4E00;&#x4E0B;&#x5DE5;&#x7A0B;&#xFF0C;&#x7136;&#x540E;&#x8FD0;&#x884C;&#x811A;&#x672C;&#xFF0C;&#x907F;&#x514D;&#x8BFB;&#x53D6;&#x4E0D;&#x5230;path&#x6587;&#x4EF6;&#x5185;&#x5BB9;&#x7684;&#x60C5;&#x51B5;&#xFF09;</li>
<li>@param params js&#x7684;map&#x5BF9;&#x8C61;&#xFF0C;&#x5305;&#x542B;&#x7684;</li>
<li>var map = {&quot;path&quot;:&quot;main.html&quot;,&quot;tag&quot;:&quot;test&quot;};  &#x7C7B;&#x4F3C;&#x8FD9;&#x6837;&#x7684;&#x53C2;&#x6570;</li>
<li><br></li>
<li>&#x53C2;&#x6570;&#x89E3;&#x6790;:</li>
<li>tag:&#x5B57;&#x7B26;&#x4E32; &#x60AC;&#x6D6E;&#x7A97;&#x552F;&#x4E00;&#x5B9A;&#x4F4D;&#x7684;&#x6807;&#x793A;</li>
<li>path:&#x5B57;&#x7B26;&#x4E32; IEC &#x4E2D;&#x7684;&#x5E03;&#x5C40;&#x6587;&#x4EF6;</li>
<li>title:&#x5B57;&#x7B26;&#x4E32; &#x60AC;&#x6D6E;&#x7A97;&#x6807;&#x9898;</li>
<li>titleBg:&#x5B57;&#x7B26;&#x4E32; &#x60AC;&#x6D6E;&#x7A97;&#x80CC;&#x666F;&#xFF0C;16&#x8FDB;&#x5236;&#xFF0C;&#x4F8B;&#x5982;#888888&#xFF0C;&#x6216;&#x8005;#88000000</li>
<li>x:&#x6574;&#x578B; &#x60AC;&#x6D6E;&#x7A97;&#x8D77;&#x59CB;X&#x5750;&#x6807;</li>
<li>y:&#x6574;&#x578B; &#x60AC;&#x6D6E;&#x7A97;&#x8D77;&#x59CB;Y&#x5750;&#x6807;</li>
<li>w:&#x6574;&#x578B; &#x60AC;&#x6D6E;&#x7A97;&#x8D77;&#x59CB;&#x5BBD;&#x5EA6;</li>
<li>h:&#x6574;&#x578B; &#x60AC;&#x6D6E;&#x7A97;&#x8D77;&#x59CB;&#x9AD8;&#x5EA6;</li>
<li>@return true &#x4EE3;&#x8868;&#x8BF7;&#x6C42;&#x6743;&#x9650;&#x6210;&#x529F;&#xFF0C;false&#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
<span class="hljs-keyword">var</span> m = {
       <span class="hljs-string">&quot;path&quot;</span>: <span class="hljs-string">&quot;main.html&quot;</span>,
       <span class="hljs-string">&quot;tag&quot;</span>: <span class="hljs-string">&quot;tag&quot;</span>,
       <span class="hljs-string">&quot;title&quot;</span>: <span class="hljs-string">&quot;sss&quot;</span>,
       <span class="hljs-string">&quot;titleBg&quot;</span>: <span class="hljs-string">&quot;#888888&quot;</span>,
       <span class="hljs-string">&quot;x&quot;</span>: <span class="hljs-number">10</span>,
       <span class="hljs-string">&quot;y&quot;</span>: <span class="hljs-number">10</span>,
       <span class="hljs-string">&quot;w&quot;</span>: <span class="hljs-number">100</span>,
       <span class="hljs-string">&quot;h&quot;</span>: <span class="hljs-number">200</span>
   };
   <span class="hljs-keyword">var</span> xd = showFloatView(m);
   logd(<span class="hljs-string">&quot;showFloatView &quot;</span> + xd);
}
main();
</code></pre>
</blockquote>
<h2 id="closefloatview"><a name="closefloatview" class="anchor-navigation-ex-anchor" href="#closefloatview"><i class="fa fa-link" aria-hidden="true"></i></a>10.4. closeFloatView</h2>
<ul>
<li>&#x5173;&#x95ED;&#x6D6E;&#x7A97;</li>
<li>@param tag showFloatView &#x4F7F;&#x7528;&#x7684;tag&#x53C2;&#x6570;&#xFF0C;&#x5BF9;&#x60AC;&#x6D6E;&#x7A97;&#x552F;&#x4E00;&#x5B9A;&#x4F4D;&#x7684;</li>
<li>@return true &#x6210;&#x529F;&#xFF0C;false&#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
 <span class="hljs-keyword">var</span> m = {
        <span class="hljs-string">&quot;path&quot;</span>: <span class="hljs-string">&quot;main.html&quot;</span>,
        <span class="hljs-string">&quot;tag&quot;</span>: <span class="hljs-string">&quot;tag&quot;</span>,
        <span class="hljs-string">&quot;title&quot;</span>: <span class="hljs-string">&quot;sss&quot;</span>,
        <span class="hljs-string">&quot;titleBg&quot;</span>: <span class="hljs-string">&quot;#888888&quot;</span>,
        <span class="hljs-string">&quot;x&quot;</span>: <span class="hljs-number">10</span>,
        <span class="hljs-string">&quot;y&quot;</span>: <span class="hljs-number">10</span>,
        <span class="hljs-string">&quot;w&quot;</span>: <span class="hljs-number">100</span>,
        <span class="hljs-string">&quot;h&quot;</span>: <span class="hljs-number">200</span>
    };
    <span class="hljs-keyword">var</span> xd = showFloatView(m);
    logd(<span class="hljs-string">&quot;showFloatView &quot;</span> + xd);
    sleep(<span class="hljs-number">3000</span>);
    closeFloatView(<span class="hljs-string">&quot;tag&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="closeallfloatview"><a name="closeallfloatview" class="anchor-navigation-ex-anchor" href="#closeallfloatview"><i class="fa fa-link" aria-hidden="true"></i></a>10.5. closeAllFloatView</h2>
<ul>
<li>&#x5173;&#x95ED;&#x6240;&#x6709;&#x60AC;&#x6D6E;&#x7A97;&#xFF0C;&#x4F46;&#x4E0D;&#x5305;&#x542B;&#x65E5;&#x5FD7;&#x60AC;&#x6D6E;&#x7A97;</li>
<li>@return true &#x6210;&#x529F;&#xFF0C;false&#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
 <span class="hljs-keyword">var</span> m = {
        <span class="hljs-string">&quot;path&quot;</span>: <span class="hljs-string">&quot;main.html&quot;</span>,
        <span class="hljs-string">&quot;tag&quot;</span>: <span class="hljs-string">&quot;tag&quot;</span>,
        <span class="hljs-string">&quot;title&quot;</span>: <span class="hljs-string">&quot;sss&quot;</span>,
        <span class="hljs-string">&quot;titleBg&quot;</span>: <span class="hljs-string">&quot;#888888&quot;</span>,
        <span class="hljs-string">&quot;x&quot;</span>: <span class="hljs-number">10</span>,
        <span class="hljs-string">&quot;y&quot;</span>: <span class="hljs-number">10</span>,
        <span class="hljs-string">&quot;w&quot;</span>: <span class="hljs-number">100</span>,
        <span class="hljs-string">&quot;h&quot;</span>: <span class="hljs-number">200</span>
    };
    <span class="hljs-keyword">var</span> xd = showFloatView(m);
    logd(<span class="hljs-string">&quot;showFloatView &quot;</span> + xd);
    sleep(<span class="hljs-number">3000</span>);
    closeAllFloatView();
}
main();
</code></pre>
</blockquote>
<h2 id="showlogwindow"><a name="showlogwindow" class="anchor-navigation-ex-anchor" href="#showlogwindow"><i class="fa fa-link" aria-hidden="true"></i></a>10.6. showLogWindow</h2>
<ul>
<li>&#x5C55;&#x793A;&#x65E5;&#x5FD7;&#x6D6E;&#x7A97;</li>
<li>@return true &#x4EE3;&#x8868;&#x8BF7;&#x6C42;&#x6743;&#x9650;&#x6210;&#x529F;&#xFF0C;false&#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = showLogWindow();
    toast(<span class="hljs-string">&quot;&#x662F;&#x5426;&#x5C55;&#x793A;:&quot;</span>+result);
}
main();
</code></pre>
</blockquote>
<h2 id="closelogwindow"><a name="closelogwindow" class="anchor-navigation-ex-anchor" href="#closelogwindow"><i class="fa fa-link" aria-hidden="true"></i></a>10.7. closeLogWindow</h2>
<ul>
<li>&#x5173;&#x95ED;&#x65E5;&#x5FD7;&#x6D6E;&#x7A97;</li>
<li>@return true &#x4EE3;&#x8868;&#x8BF7;&#x6C42;&#x6743;&#x9650;&#x6210;&#x529F;&#xFF0C;false&#x4EE3;&#x8868;&#x5931;&#x8D25;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
     closeLogWindow();
}
main();
</code></pre>
</blockquote>
<h2 id="setlogviewsize"><a name="setlogviewsize" class="anchor-navigation-ex-anchor" href="#setlogviewsize"><i class="fa fa-link" aria-hidden="true"></i></a>10.8. setLogViewSize</h2>
<ul>
<li>&#x8BBE;&#x7F6E;&#x65E5;&#x5FD7;&#x7A97;&#x53E3;&#x5927;&#x5C0F;</li>
<li>@param w &#x5BBD;&#x5EA6;</li>
<li>@param h &#x9AD8;&#x5EA6;</li>
<li>@param textSize &#x65E5;&#x5FD7;&#x7684;&#x5B57;&#x4F53;&#x5927;&#x5C0F;</li>
<li>@param backgroundColor &#x80CC;&#x666F;&#x989C;&#x8272;&#xFF0C;&#x4F8B;&#x5982;#336699</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    setLogViewSize(<span class="hljs-number">500</span>,<span class="hljs-number">600</span>,<span class="hljs-number">14</span>,<span class="hljs-string">&quot;#FFFFFF&quot;</span>);
}
main();
</code></pre>
</blockquote>
<h2 id="setlogtext"><a name="setlogtext" class="anchor-navigation-ex-anchor" href="#setlogtext"><i class="fa fa-link" aria-hidden="true"></i></a>10.9. setLogText</h2>
<ul>
<li>&#x5C55;&#x793A;&#x6D88;&#x606F;&#x5230;&#x60AC;&#x6D6E;&#x7A97;&#x65E5;&#x5FD7;&#x4E2D;&#xFF0C;&#x989C;&#x8272;&#x662F;&#x767D;&#x8272;&#x7684;</li>
<li>@param msg &#x6D88;&#x606F;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = setLogText(<span class="hljs-string">&quot;&#x5F00;&#x59CB;&#x8FD0;&#x884C;...&quot;</span>); 
}
main();
</code></pre>
</blockquote>
<h1 id="&#x5B9A;&#x65F6;&#x4EFB;&#x52A1;"><a name="&#x5B9A;&#x65F6;&#x4EFB;&#x52A1;" class="anchor-navigation-ex-anchor" href="#&#x5B9A;&#x65F6;&#x4EFB;&#x52A1;"><i class="fa fa-link" aria-hidden="true"></i></a>11. &#x5B9A;&#x65F6;&#x4EFB;&#x52A1;</h1>
<h2 id="startjob-&#x5F00;&#x542F;&#x5B9A;&#x65F6;"><a name="startjob-&#x5F00;&#x542F;&#x5B9A;&#x65F6;" class="anchor-navigation-ex-anchor" href="#startjob-&#x5F00;&#x542F;&#x5B9A;&#x65F6;"><i class="fa fa-link" aria-hidden="true"></i></a>11.1. startJob &#x5F00;&#x542F;&#x5B9A;&#x65F6;</h2>
<ul>
<li>&#x5F00;&#x542F;&#x4E00;&#x4E2A;&#x5B9A;&#x65F6;&#x811A;&#x672C;&#x4EFB;&#x52A1;</li>
<li>@param tag &#x4EFB;&#x52A1;&#x7684;&#x552F;&#x4E00;&#x6807;&#x793A;&#xFF0C;&#x4E0D;&#x80FD;&#x4E3A;&#x7A7A;&#xFF0C;&#x811A;&#x672C;&#x4E2D;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;readConfigString(&quot;jobTaskTag&quot;)&#x83B7;&#x53D6;&#x5F53;&#x524D;tag&#x503C;&#xFF0C;&#x5224;&#x65AD;&#x662F;&#x90A3;&#x4E2A;&#x4EFB;&#x52A1;&#x8FC7;&#x6765;&#x6267;&#x884C;&#x7684;</li>
<li>@param execTime &#x5B9A;&#x65F6;&#x65F6;&#x95F4;&#x683C;&#x5F0F;: 2020-04-17 19:20:00&#xFF0C;&#x6216;&#x8005;&#x76F4;&#x63A5;&#x662F;&#x79D2;&#x6570;&#x5B57;&#xFF0C;&#x4F8B;&#x5982; 3&#xFF0C;&#x4EE3;&#x8868;3&#x79D2;&#x540E;</li>
<li>@param cancelBeforeRunning</li>
<li>@return &#x6574;&#x578B; jobid</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> time=<span class="hljs-string">&quot;2020-04-17 09:00:00&quot;</span>;
    <span class="hljs-comment">//&#x4F7F;&#x7528;&#x65E5;&#x671F;&#x5F00;&#x542F;&#x4E00;&#x4E2A;&#x4EFB;&#x52A1;</span>
    <span class="hljs-keyword">var</span> id =startJob(<span class="hljs-string">&quot;task1&quot;</span>,time,<span class="hljs-literal">true</span>);
    logd(<span class="hljs-string">&quot;job id &quot;</span>+id);    
    <span class="hljs-comment">//&#x4F7F;&#x7528;&#x79D2;&#x6570;&#x5F00;&#x542F;&#xFF0C;60&#x79D2;&#x540E;&#x6267;&#x884C;&#x4E00;&#x4E2A;&#x4EFB;&#x52A1;</span>
    <span class="hljs-keyword">var</span> id2 =startJob(<span class="hljs-string">&quot;task2&quot;</span>,<span class="hljs-string">&quot;60&quot;</span>,<span class="hljs-literal">true</span>);
    logd(<span class="hljs-string">&quot;job id &quot;</span>+id2);   
}
main();
</code></pre>
</blockquote>
<h2 id="cancelalljob-&#x53D6;&#x6D88;&#x6240;&#x6709;&#x5B9A;&#x65F6;"><a name="cancelalljob-&#x53D6;&#x6D88;&#x6240;&#x6709;&#x5B9A;&#x65F6;" class="anchor-navigation-ex-anchor" href="#cancelalljob-&#x53D6;&#x6D88;&#x6240;&#x6709;&#x5B9A;&#x65F6;"><i class="fa fa-link" aria-hidden="true"></i></a>11.2. cancelAllJob &#x53D6;&#x6D88;&#x6240;&#x6709;&#x5B9A;&#x65F6;</h2>
<ul>
<li>&#x53D6;&#x6D88;&#x6240;&#x6709;&#x5B9A;&#x65F6;</li>
<li>@return bool true &#x4EE3;&#x8868;&#x6709;&#x4EFB;&#x52A1;&#x88AB;&#x53D6;&#x6D88;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = cancelAllJob();
    logd(result);
}
main();
</code></pre>
</blockquote>
<h2 id="canceljob-&#x53D6;&#x6D88;&#x6307;&#x5B9A;tag&#x5B9A;&#x65F6;"><a name="canceljob-&#x53D6;&#x6D88;&#x6307;&#x5B9A;tag&#x5B9A;&#x65F6;" class="anchor-navigation-ex-anchor" href="#canceljob-&#x53D6;&#x6D88;&#x6307;&#x5B9A;tag&#x5B9A;&#x65F6;"><i class="fa fa-link" aria-hidden="true"></i></a>11.3. cancelJob &#x53D6;&#x6D88;&#x6307;&#x5B9A;TAG&#x5B9A;&#x65F6;</h2>
<ul>
<li>&#x901A;&#x8FC7;tag&#x5BF9;&#x5B9A;&#x65F6;&#x4EFB;&#x52A1;&#x8FDB;&#x884C;&#x53D6;&#x6D88;</li>
<li>@param tag tag&#x540D;&#x79F0;&#xFF0C;startJob&#x7684;&#x65F6;&#x5019;tag&#x53C2;&#x6570;&#x7684;&#x503C;</li>
<li>@return bool true &#x4EE3;&#x8868;&#x6709;&#x4EFB;&#x52A1;&#x88AB;&#x53D6;&#x6D88;<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{

    <span class="hljs-keyword">var</span> result = cancelJob(<span class="hljs-string">&quot;task1&quot;</span>);
    logd(result);
}
main();
</code></pre>
</blockquote>
</li>
</ul>
<h2 id="getalljobtag-&#x83B7;&#x53D6;&#x6240;&#x6709;&#x5B9A;&#x65F6;&#x6807;&#x7B7E;"><a name="getalljobtag-&#x83B7;&#x53D6;&#x6240;&#x6709;&#x5B9A;&#x65F6;&#x6807;&#x7B7E;" class="anchor-navigation-ex-anchor" href="#getalljobtag-&#x83B7;&#x53D6;&#x6240;&#x6709;&#x5B9A;&#x65F6;&#x6807;&#x7B7E;"><i class="fa fa-link" aria-hidden="true"></i></a>11.4. getAllJobTag &#x83B7;&#x53D6;&#x6240;&#x6709;&#x5B9A;&#x65F6;&#x6807;&#x7B7E;</h2>
<ul>
<li>&#x53D6;&#x5F97;&#x6240;&#x6709;&#x7684;&#x5B9A;&#x65F6;&#x4EFB;&#x52A1;&#x6807;&#x7B7E;</li>
<li>@return &#x5B57;&#x7B26;&#x4E32;&#x6570;&#x7EC4;&#x6216;&#x8005;null</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = getAllJobTag();
    logd(result);
}
main();
</code></pre>
</blockquote>
<h1 id="&#x5176;&#x4ED6;&#x51FD;&#x6570;"><a name="&#x5176;&#x4ED6;&#x51FD;&#x6570;" class="anchor-navigation-ex-anchor" href="#&#x5176;&#x4ED6;&#x51FD;&#x6570;"><i class="fa fa-link" aria-hidden="true"></i></a>12. &#x5176;&#x4ED6;&#x51FD;&#x6570;</h1>
<h2 id="random-&#x968F;&#x673A;&#x51FD;&#x6570;"><a name="random-&#x968F;&#x673A;&#x51FD;&#x6570;" class="anchor-navigation-ex-anchor" href="#random-&#x968F;&#x673A;&#x51FD;&#x6570;"><i class="fa fa-link" aria-hidden="true"></i></a>12.1. random &#x968F;&#x673A;&#x51FD;&#x6570;</h2>
<ul>
<li>&#x53D6;&#x5F97;&#x67D0;&#x4E2A;&#x8303;&#x56F4;&#x7684;&#x968F;&#x673A;&#x503C;</li>
<li>@param min &#x6700;&#x5C0F;&#x503C;</li>
<li>@param max &#x6700;&#x5927;&#x503C;</li>
<li>@return &#x6574;&#x578B; &#x5728;min&#x548C;max&#x4E2D;&#x95F4;&#x7684;&#x503C;, &#x5305;&#x542B;&#x6700;&#x5927;&#x548C;&#x6700;&#x5C0F;&#x503C;</li>
</ul>
<blockquote>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">var</span> result = random(<span class="hljs-number">100</span>,<span class="hljs-number">1000</span>);
    sleep(result);
}
main();
</code></pre>
</blockquote>

<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="global.html" class="navigation navigation-prev " aria-label="Previous page: 全局模块">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="selector-node.html" class="navigation navigation-next " aria-label="Next page: 选择器&节点">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"全局快捷事件","level":"1.6.2","depth":2,"next":{"title":"选择器&节点","level":"1.6.3","depth":2,"path":"zh-cn/funcs/global/selector-node.md","ref":"zh-cn/funcs/global/selector-node.md","articles":[]},"previous":{"title":"全局模块","level":"1.6.1","depth":2,"path":"zh-cn/funcs/global/global.md","ref":"zh-cn/funcs/global/global.md","articles":[]},"dir":"ltr"},"config":{"plugins":["chapter-fold","code","copy-code-button","-lunr","-search","search-pro","anchor-navigation-ex","hide-element","favicon-absolute","popup"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"chapter-fold":{},"search-pro":{},"popup":{},"code":{"copyButtons":true},"favicon-absolute":{"appleTouchIconMore":{},"appleTouchIconPrecomposed152":"/zh-cn/images/ico.png","appleTouchIconPrecomposedMore":{},"favicon":"/zh-cn/images/ico.png"},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"copy-code-button":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"EasyClick开发文档","language":"zh-hans","gitbook":"*","description":"记录EasyClick开发教程和常用的函数"},"file":{"path":"zh-cn/funcs/global/global-shortcut.md","mtime":"2020-04-28T11:58:25.676Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-05-27T06:59:59.950Z"},"basePath":"../../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../../gitbook/gitbook.js"></script>
    <script src="../../../gitbook/theme.js"></script>
    
        
        <script src="../../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

